package TeacherAdmin;

import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

import java.util.concurrent.TimeUnit;

import static java.lang.Thread.sleep;

public class Init {
    public static WebDriver webDriver;
    @BeforeAll
    static void setUp() throws InterruptedException {
        ChromeOptions options = new ChromeOptions();
        options.addArguments("--remote-allow-origins=*");
        webDriver =new ChromeDriver();
        //获取登录页
        webDriver.get("http://192.168.63.227:10001/digitrain/");
        webDriver.manage().window().maximize();
        webDriver.manage().timeouts().implicitlyWait(3, TimeUnit.DAYS);

    }

    @AfterAll
    static void teardown() throws InterruptedException {
        sleep(3000);
//        webDriver.quit();
    }
}
